package com.xbongbong.crm.feign;

import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.statistic.result.pojo.ChartResultPojo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author sunshaoxiang
 * @ClassName ChartResultFeignClient
 * @Description feign 调用统计服务
 * @Date 2022/6/8 15:47
 * @Version 1.0
 **/
@FeignClient(name = "pro-web-statistics",contextId = "chartFeignClient")
public interface ChartFeignClient {

    /**
     * 获取指标总额统计结果
     * 重构前 -> com.xbongbong.paas.manager.feign.ChartResultFeignClient#value(com.xbongbong.pro.statistic.result.pojo.ChartResultPojo, java.lang.String)
     * @param chartResultPojo
     * @param lang
     * @return
     */
    @RequestMapping(value = "/pro/v1/chart/result/feign/value", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<Object> value(@RequestBody ChartResultPojo chartResultPojo, @RequestParam("lang") String lang);
}
